﻿using System;
using UniRx.InternalUtil;

namespace UniRx
{
	// Token: 0x02000238 RID: 568
	public static class ObservableExtensions
	{
		// Token: 0x06000D3D RID: 3389 RVA: 0x0003F6CE File Offset: 0x0003DACE
		public static IDisposable Subscribe<T>(this IObservable<T> source)
		{
			return source.Subscribe(ThrowObserver<T>.Instance);
		}

		// Token: 0x06000D3E RID: 3390 RVA: 0x0003F6DB File Offset: 0x0003DADB
		public static IDisposable Subscribe<T>(this IObservable<T> source, Action<T> onNext)
		{
			return source.Subscribe(Observer.CreateSubscribeObserver<T>(onNext, Stubs.Throw, Stubs.Nop));
		}

		// Token: 0x06000D3F RID: 3391 RVA: 0x0003F6F3 File Offset: 0x0003DAF3
		public static IDisposable Subscribe<T>(this IObservable<T> source, Action<T> onNext, Action<Exception> onError)
		{
			return source.Subscribe(Observer.CreateSubscribeObserver<T>(onNext, onError, Stubs.Nop));
		}

		// Token: 0x06000D40 RID: 3392 RVA: 0x0003F707 File Offset: 0x0003DB07
		public static IDisposable Subscribe<T>(this IObservable<T> source, Action<T> onNext, Action onCompleted)
		{
			return source.Subscribe(Observer.CreateSubscribeObserver<T>(onNext, Stubs.Throw, onCompleted));
		}

		// Token: 0x06000D41 RID: 3393 RVA: 0x0003F71B File Offset: 0x0003DB1B
		public static IDisposable Subscribe<T>(this IObservable<T> source, Action<T> onNext, Action<Exception> onError, Action onCompleted)
		{
			return source.Subscribe(Observer.CreateSubscribeObserver<T>(onNext, onError, onCompleted));
		}

		// Token: 0x06000D42 RID: 3394 RVA: 0x0003F72B File Offset: 0x0003DB2B
		public static IDisposable SubscribeWithState<T, TState>(this IObservable<T> source, TState state, Action<T, TState> onNext)
		{
			return source.Subscribe(Observer.CreateSubscribeWithStateObserver<T, TState>(state, onNext, Stubs<TState>.Throw, Stubs<TState>.Ignore));
		}

		// Token: 0x06000D43 RID: 3395 RVA: 0x0003F744 File Offset: 0x0003DB44
		public static IDisposable SubscribeWithState<T, TState>(this IObservable<T> source, TState state, Action<T, TState> onNext, Action<Exception, TState> onError)
		{
			return source.Subscribe(Observer.CreateSubscribeWithStateObserver<T, TState>(state, onNext, onError, Stubs<TState>.Ignore));
		}

		// Token: 0x06000D44 RID: 3396 RVA: 0x0003F759 File Offset: 0x0003DB59
		public static IDisposable SubscribeWithState<T, TState>(this IObservable<T> source, TState state, Action<T, TState> onNext, Action<TState> onCompleted)
		{
			return source.Subscribe(Observer.CreateSubscribeWithStateObserver<T, TState>(state, onNext, Stubs<TState>.Throw, onCompleted));
		}

		// Token: 0x06000D45 RID: 3397 RVA: 0x0003F76E File Offset: 0x0003DB6E
		public static IDisposable SubscribeWithState<T, TState>(this IObservable<T> source, TState state, Action<T, TState> onNext, Action<Exception, TState> onError, Action<TState> onCompleted)
		{
			return source.Subscribe(Observer.CreateSubscribeWithStateObserver<T, TState>(state, onNext, onError, onCompleted));
		}

		// Token: 0x06000D46 RID: 3398 RVA: 0x0003F780 File Offset: 0x0003DB80
		public static IDisposable SubscribeWithState2<T, TState1, TState2>(this IObservable<T> source, TState1 state1, TState2 state2, Action<T, TState1, TState2> onNext)
		{
			return source.Subscribe(Observer.CreateSubscribeWithState2Observer<T, TState1, TState2>(state1, state2, onNext, Stubs< TState1, TState2>.Throw, Stubs< TState1, TState2>.Ignore));
		}

		// Token: 0x06000D47 RID: 3399 RVA: 0x0003F79A File Offset: 0x0003DB9A
		public static IDisposable SubscribeWithState2<T, TState1, TState2>(this IObservable<T> source, TState1 state1, TState2 state2, Action<T, TState1, TState2> onNext, Action<Exception, TState1, TState2> onError)
		{
			return source.Subscribe(Observer.CreateSubscribeWithState2Observer<T, TState1, TState2>(state1, state2, onNext, onError, Stubs<TState1, TState2>.Ignore));
		}

		// Token: 0x06000D48 RID: 3400 RVA: 0x0003F7B1 File Offset: 0x0003DBB1
		public static IDisposable SubscribeWithState2<T, TState1, TState2>(this IObservable<T> source, TState1 state1, TState2 state2, Action<T, TState1, TState2> onNext, Action<TState1, TState2> onCompleted)
		{
			return source.Subscribe(Observer.CreateSubscribeWithState2Observer<T, TState1, TState2>(state1, state2, onNext, Stubs< TState1, TState2>.Throw, onCompleted));
		}

		// Token: 0x06000D49 RID: 3401 RVA: 0x0003F7C8 File Offset: 0x0003DBC8
		public static IDisposable SubscribeWithState2<T, TState1, TState2>(this IObservable<T> source, TState1 state1, TState2 state2, Action<T, TState1, TState2> onNext, Action<Exception, TState1, TState2> onError, Action<TState1, TState2> onCompleted)
		{
			return source.Subscribe(Observer.CreateSubscribeWithState2Observer<T, TState1, TState2>(state1, state2, onNext, onError, onCompleted));
		}

		// Token: 0x06000D4A RID: 3402 RVA: 0x0003F7DC File Offset: 0x0003DBDC
		public static IDisposable SubscribeWithState3<T, TState1, TState2, TState3>(this IObservable<T> source, TState1 state1, TState2 state2, TState3 state3, Action<T, TState1, TState2, TState3> onNext)
		{
			return source.Subscribe(Observer.CreateSubscribeWithState3Observer<T, TState1, TState2, TState3>(state1, state2, state3, onNext, Stubs< TState1, TState2, TState3>.Throw, Stubs< TState1, TState2, TState3>.Ignore));
		}

		// Token: 0x06000D4B RID: 3403 RVA: 0x0003F7F8 File Offset: 0x0003DBF8
		public static IDisposable SubscribeWithState3<T, TState1, TState2, TState3>(this IObservable<T> source, TState1 state1, TState2 state2, TState3 state3, Action<T, TState1, TState2, TState3> onNext, Action<Exception, TState1, TState2, TState3> onError)
		{
			return source.Subscribe(Observer.CreateSubscribeWithState3Observer<T, TState1, TState2, TState3>(state1, state2, state3, onNext, onError, Stubs< TState1, TState2, TState3>.Ignore));
		}

		// Token: 0x06000D4C RID: 3404 RVA: 0x0003F811 File Offset: 0x0003DC11
		public static IDisposable SubscribeWithState3<T, TState1, TState2, TState3>(this IObservable<T> source, TState1 state1, TState2 state2, TState3 state3, Action<T, TState1, TState2, TState3> onNext, Action<TState1, TState2, TState3> onCompleted)
		{
			return source.Subscribe(Observer.CreateSubscribeWithState3Observer<T, TState1, TState2, TState3>(state1, state2, state3, onNext, Stubs< TState1, TState2, TState3>.Throw, onCompleted));
		}

		// Token: 0x06000D4D RID: 3405 RVA: 0x0003F82A File Offset: 0x0003DC2A
		public static IDisposable SubscribeWithState3<T, TState1, TState2, TState3>(this IObservable<T> source, TState1 state1, TState2 state2, TState3 state3, Action<T, TState1, TState2, TState3> onNext, Action<Exception, TState1, TState2, TState3> onError, Action<TState1, TState2, TState3> onCompleted)
		{
			return source.Subscribe(Observer.CreateSubscribeWithState3Observer<T, TState1, TState2, TState3>(state1, state2, state3, onNext, onError, onCompleted));
		}
	}
}
